package com.qiaoba.mq.bussnis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 消息接收者（消费者）
 * @author 乔巴
 * @date 2021/3/22 16:10
 **/
@Component
@RabbitListener(queues = "mall.order.cancel")
public class OrderReceiver {

    private static Logger LOGGER = LoggerFactory.getLogger(OrderReceiver.class);

    @RabbitHandler
    public void handle(Long orderId){
        LOGGER.info("receive delay message orderId:{}",orderId);
        LOGGER.info("进行业务操作。。。。。。。。");
    }
}
